<?php
namespace app\index\controller;

use think\Db;

class Index extends Content
{


    public function index()
    {
        $banner=Db::name('banner')->select();
        $res=Db::name('article')->select();
        $webset=Db::name('webset')->find();
        $this->assign('banner',$banner);
        $this->assign('article',$res);
        $this->assign('web',$webset);
        return view('/index');

    }


    public function banner(){
        $res=Db::name('banner')->select();
        return $this->json(0,"success",10,$res);
    }


    public function article(){
        $res=Db::name('article')->select();
        return $this->json(0,"success",10,$res);
    }

}
